Cartridge-based molecular assays for detecting drug resistance